
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login Page</title>
<style type="text/css">
body {
	margin: 0px;
	width: 100%;
	height: 100%;
}
.text_primary {
	border-radius: 5px;
	width: 300px;
	height: 20px;
	border: 1px solid #ccc;
	background-color: white;
}

.text_primary:FOCUS {
	outline: none;
	border: 1px solid #7bc1f7;
	box-shadow: 0px 0px 2px #7bc1f7;
	-moz-box-shadow: 0px 0px 2px #7bc1f7;
	-webkit-box-shadow: 0px 0px 2px #7bc1f7;
}

.btn_login {
	margin-top: 5px;
	color: #fff;
	background-color: #428bca;
	border: 1px solid #357ebd;
	border-radius: 3px;
	width: 300px;
	height: 30px;
}

.btn_login:hover {
	color: #fff;
	background-color: #3276b1;
	border-color: #285e8e
}

.login_form_outer {
	margin-left: 35%;
	margin-top: 110px;
	width: 35%;
	height: 45%;
}

.login_form_inner {
	background-color: #fff;
	border: 1px solid #bbb;
	border-radius: 5px;
	vertical-align: middle;
	box-shadow: 0px 10px 10px -4px #ccc;
	position: relative;
	width: 450px;
	height: 200px;
}

.error_form {
	color: red;
}

.lbl_primary {
	display: block;
	width: 300px;
	height: 20px;
	font-family: Arial;
	font-size: 12px;
	font-weight: bold;
	font-style: normal;
	line-height: 30px;
	text-decoration: none;
	vertical-align: middle;
}

.lbl_large {
	width: 300px;
	height: 20px;
	font-family: serif;
	font-size: 14px;
	font-weight: bold;
	font-style: normal;
}
</style>
</head>
<body>
	<form:form action="/j_spring_security_check" method="post">
		<div class="login_form_outer">
			<table>
				<tr>
					<td class="lbl_large">Please Login Here</td>
				</tr>
			</table>
			<div class="login_form_inner">
				<table align="center">
					<tr>
						<td><form:label path="userName" class="lbl_primary">User Name</form:label></td>
					</tr>
					<tr>
						<td><form:input path="userName" class="text_primary" /></td>
					</tr>
					<tr>
						<td><font color="red"><form:errors path="userName" /></font></td>
					</tr>
					<tr>
						<td><form:label path="password" class="lbl_primary"> Password</form:label></td>
					</tr>
					<tr>
						<td><form:password path="password" class="text_primary" /></td>
					</tr>
					<tr>
						<td><font color="red"><form:errors path="password" /></font></td>
					</tr>
					<tr>
						<td><input type="submit" value="Login" class="btn_login"></td>
					</tr>
					<tr>
						<td><c:if test="${not empty error_msg}">
								<div class="error_form">
									<table align="center">
										<tr>
											<td>${error_msg}</td>
										</tr>
									</table>
								</div>
							</c:if>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<input type="hidden" name="${_csrf.parameterName}"
			value="${_csrf.token}" />
	</form:form>

</body>
</html>